
package com.example.paper.common.datam.userStudentJob;

import com.example.paper.common.datam.migrate.writer.BaseWriter;
import com.example.paper.common.datam.service.impl.UserStuent2Service;
import com.example.paper.common.entity.UserStudent2;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * 描述.
 *
 * @author Long Fengfan, 2022年10月17日

 */
@Component
@Slf4j
public class UserStudentWriter extends BaseWriter<UserStudent2> {

    @Autowired
    private UserStuent2Service userStuent2Service;

    @Override
    public void doWrite(List<UserStudent2> infos) {
        userStuent2Service.saveBatch(infos);
    }

    @Override
    public void rollBack(Map<String, Object> processorParams) {
        log.info("rollback writer...");
    }
}
